import request from '@/utils/request';

const BaseAPI = {

  /**
   * 发送邮箱验证码
   */
  getOptions(data) {
    return request({
      url: 'base/getOptions',
      method: 'post',
      data: data,
    });
  },

  /**
   * 上传文件
   */
  upload(data) {
    return request({
      url: 'upload/upload',
      method: 'post',
      data: data,
      headers: {
        'Content-Type': 'multipart/form-data',
      },
    });
  },

  /**
   * 发送邮箱验证码
   */
  sendEmailCode(data) {
    return request({
      url: 'base/sendEmailCode',
      method: 'post',
      data: data,
    });
  },

  /**
   * 发送邮箱验证码
   */
  sendSmsCode(data) {
    return request({
      url: 'base/sendSmsCode',
      method: 'post',
      data: data,
    });
  },
};

export default BaseAPI;
